package org.example.myleet.p1239;

import org.example.myleet.Utils.Assert;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(4 == solution.maxLength(parse(new String[]{"un","iq","ue"})));
        Assert.isTrue(0 == solution.maxLength(parse(new String[]{"unu","iqi","ueu"})));
        Assert.isTrue(6 == solution.maxLength(parse(new String[]{"cha","r","act","ers"})));
        Assert.isTrue(26 == solution.maxLength(parse(new String[]{"abcdefghijklmnopqrstuvwxyz"})));
        Assert.isTrue(16 == solution.maxLength(parse(new String[]{"un","iq","ue","r","s","t","u","v","w","x","xyzabcd"})));
        Assert.isTrue(20 == solution.maxLength(parse(new String[]{"xdvqiefpcs","vgnacw","raobcnwgufztdykmsvlj"})));
    }

    private static List<String> parse(String[] input) {
        return Arrays.stream(input).collect(Collectors.toList());
    }
}
